home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac: Not for Sale
/
Another.not.for.sale (Australia).iso
/
fade into you
/
being there
/
Issues & Ideas
/
SGML
/
hytime.is.annexA
< prev
next >
Wrap
Text File
|
1992-07-21
|
55KB
|
1,154 lines
UNOFFICIAL COMPILATION of the Formal Specifications from Annex A
("Useful element types, notations, and instances") of the HyTime
Standard (ISO/IEC 10744:1992). This is not intended to replace
Annex A of the HyTime standard itself;
it is merely intended to provide an electronic form of those
portions of Annex A that HyTime applications implementers could
be expected to want to have in electronic form. This information
is provided for interim purposes only, and it should be destroyed
when the official electronic version of this information becomes
available. Again, THIS FILE IS NO SUBSTITUTE FOR THE STANDARD, AND
IT IS NOT THE STANDARD. THE ONLY RELIABLE SOURCE IS THE OFFICIAL
PRINTED ISO-SANCTIONED FORM OF THE STANDARD.
This file was manually typed from the printed text of the standard.
All of this material is subject to the following copyright notice and
license:
Copyright (C) International Organization for Standardization 1992.
Permission to copy in any form is granted for use with
conforming HyTime systems and applications as defined in
ISO/IEC 10744, provided this notice is included in all copies.
A.1 HyLex: HyTime lexical model notation
A.1.1.2 Delimiters
Role String Description
---- ------ -----------
XESC \ Escape
XGRPO ( Group open
XGRPC ) Group close
XLIT " Literal start or end
XLITA ' Literal start or end (alternative)
XSEQ , Sequence connector
XOR | Or connector
XDTGO [ Alternative single-character pattern open
XDTGC ] Alternative single-character pattern close
XOPT ? Optional occurrence indicator
XREP + Required and repeatable
XOREP * Optional and repeatable
XMINUS - Negation and range
XRNI # Reserved name indicator
A.1.1.4 Wildcards
# Any single character
(#, #+) (prohibited)
(#+) (ok)
(#*) (ok)
A.1.1.5 Hit boundary constraints
#SOD The hit must begin at the start of the match domain
#EOD The hit must end at the end of the match domain.
#ISC Ignored starting characters can occur before the hit;
equivalent to: (#SOD, #*).
#IEC Ignored ending characters can occur after the hit;
equivalent to: (#*, #EOD).
A.1.1.6 Alternative single-character patterns (ASCP)
Example: [A-Za-z] is any alphabetic character.
A.1.1.7 Matching Rules.
HyLex finds the longest match for known sub-models (sequences of
literals and ASCPs) and the shortest match for wildcard sequences.
Known sub-models are matched in the order they occur, with no overlap.
If multiple alternative sub-models (that is, OR group members) start
with the same character, only the longest among them will be matched
at a given point in the match domain.
A.1.2 HyLex element type
<!-- HyTime Lexical Model -->
<!NOTATION HyLex PUBLIC
"+//ISO/IEC 10744:1992//NOTATION HyTime Lexical Model Notation//EN" >
<!ELEMENT HyLex -- HyTime lexical model --
- - (#PCDATA) >
<!ATTLIST HyLex HyTime NAME #FIXED lexmodel
notation -- Data content notation --
NAME #FIXED HyLex
delims -- Data content notation delimiter changes --
-- Constraint: names are delimiter role names -
-- Constraint: a given NAME can occur only once --
-- lextype( (NAME, s+, char*),
s+, NAME, s+, char*)* ) --
CDATA #IMPLIED -- Default: not changed --
ltn -- Lexical type name --
NAME #REQUIRED
lexord -- Lexicographic ordering for comparisions --
-- reftype(lexord) --
-- lextype(IDREF|(RNI,"SGMLCASE")) --
boundary -- Hit boundary counstraint --
(sodeod|sodiec|isceod|isciec|inmodel) sodeod
qpnpsn -- QPN property set names --
-- Constraint: searched in order listed --
-- lextype(NOTATION, (S+, NOTATION)*) --
NAMES #IMPLIED -- Default: standard sets --
qltnlmgi -- QLTN lexical model GIs --
-- Constraint: searched in order listed --
-- lextype(gil) --
NAMES #FIXED HyLex
norm -- normalization --
(norm|unorm) norm
wildmax -- Maximum bit combinations in wildcard match --
NUMBER 512 >
A.1.3 Useful HyLex types
Public identifier for this material:
"ISO/IEC 10744:1992//TEXT Useful HyLex Lexical Types//EN"
<!-- Useful Lexical Types -->
<hylex norm ltn=IDRN> (IDREF | "#NULL") </hylex>
<hylex norm ltn=NAMES> (NAME, (s+, NAME)*) </hylex>
<hylex norm ltn=GIL> (GI, (s+, GI)*) </hylex>
<hylex norm ltn=IDR2> (IDREF, s+, IDREF) </hylex>
<hylex norm ltn=IDR21> (IDR2, (s+, IDR2)*) </hylex>
<hylex norm ltn=ATTORCON> ((ATTNAME|("#CONTENT")) </hylex>
<hylex norm ltn=num1> (number, (s+, number)*) </hylex>
<hylex norm ltn=frac> (number, s+, number) <!--fraction (numerator 1st)-->
</hylex>
<hylex norm ltn=fracs> (frac, (s+, frac)*) </hylex>
<hylex norm ltn=snum> ([+-]?,number) <!--signed number--> </hylex>
<hylex norm ltn=nzdigit> ([1-9]) <!--non-zero digit--> </hylex>
<hylex norm ltn=unzi> (nzdigit, digit*) <!--unsigned nonzero integer-->
</hylex>
<hylex norm ltn=snzi> ([+-]?,unzi) <!--signed nonzero integer--> </hylex>
<hylex norm ltn=word> (nmchar+) </hylex>
<hylex norm ltn=words> (word, (s+, word)*) </hylex>
<hylex unorm ltn=literal> ((LIT,#*,LIT) | (LITA,#*,LITA)) <!--SGML literal-->
</hylex>
The following models define string forms for qualified lexical type
names, qualified property names, and function arguments. The
delimiter roles are SGML delimiter roles, not data content notation
delimiter roles; they cannot be changed by a "delims" attribute.
<hylex ltn=qltn> ((LMGI,PLUS)?,LTN) </hylex>
<hylex ltn=qpn> (((PSN,PLUS)?,(PN,(DSO,(QPN|QLTN|word|literal),DSC)?)),
(NET,((PSN,PLUS)?,(PN,(DSO,(QPN|QLTN|word|literal),DSC)?)))* </hylex>
<hylex ltn=arg> (PERO,nzdigit,((digit, digit?)?) </hylex>
A.2 HyTime property definition
<!-- HyTime Property Definition -->
<!ELEMENT HyPD -- HyTime Property Definition --
- O (#PCDATA) >
<!ATTLIST HyPD HyTime NAME #FIXED propdef
pn -- Property name --
-- Constraint: must be unique in property set --
NAME #REQUIRED
psn -- Property set name --
-- lextype(NOTATION) --
NAME #REQUIRED
lex -- Lexical type of property if not inherent --
-- lextype(qltn|qpn) --
inherent -- Source of inherent property --
-- lextype(NOTATION) --
(SGML|HyTime) #IMPLIED -- Default: not inherent --
dspec -- Definition of specifier for property --
deforsyn -- Definition or synonym? --
(def|syn) def
qpnpsn -- QPN property set names --
-- Constraint: searched in order listed --
-- lextype(NOTATION, (s+, NOTATION)*) --
NAMES #IMPLIED -- Default: standard sets --
qltnlmgi -- QLTN lexical model GIs --
-- Constraint: searched in order listed --
-- lextype(gil) --
NAMES #IMPLIED -- Default: none used -->
A.2.1 Useful property sets
The following notation declarations identify the sources for the
inherent definitions in the property sets.
<!NOTATION SGML PUBLIC "+//ISO 8879:1986//NOTATION
Standard Generalized Markup Language//EN">
<!NOTATION HyTime PUBLIC "+//ISO/IEC 10744:1992//NOTATION
Hypermedia/Time-based Structuring Language//EN">
A.2.1.1 SGML lexical properties
These properties are purely lexical. In a lexical scan they are
satisfied by the occurrence of a string assigned to them by the
concrete syntax of the domain, without regard to context or the
current parsing state. In a query or proploc they return all the
strings assigned to them, in normalized form with single space between
strings.
A.2.1.1.1 HTlex1: SGML character classes
<!NOTATION HTlex1 PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HTlex1::SGML character classes//EN">
The following properties are the four abstract syntax character
classes. (Ee is excluded because it is a system signal.)
<HyPD psn=HTlex1 SGML pn=digit>
<HyPD psn=HTlex1 SGML pn=lcletter>
<HyPD psn=HTlex1 SGML pn=special>
<HyPD psn=HTlex1 SGML pn=ucletter>
The following properties are the 14 concrete syntax character classes.
<HyPD psn=HTlex1 SGML pn=datachar>
<HyPD psn=HTlex1 SGML pn=delmchar>
<HyPD psn=HTlex1 SGML pn=funchar>
<HyPD psn=HTlex1 SGML pn=lcnmchar>
<HyPD psn=HTlex1 SGML pn=msichar>
<HyPD psn=HTlex1 SGML pn=msochar>
<HyPD psn=HTlex1 SGML pn=msschar>
<HyPD psn=HTlex1 SGML pn=re>
<HyPD psn=HTlex1 SGML pn=rs>
<HyPD psn=HTlex1 SGML pn=sepchar>
<HyPD psn=HTlex1 SGML pn=space>
<HyPD psn=HTlex1 SGML pn=ucnmchar>
<HyPD psn=HTlex1 SGML pn=ucnmstrt>
The following properties are syntactic variables derived from the
character classes.
<HyPD psn=HTlex1 SGML pn=s> <!--s ("white space") separator-->
<HyPD psn=HTlex1 SGML pn=fnch> <!--function character-->
<HyPD psn=HTlex1 SGML pn=nmsch> <!--name start character-->
<HyPD psn=HTlex1 SGML pn=nmchar> <!--name character-->
<HyPD psn=HTlex1 SGML pn=muchar> <!--markup character-->
<HyPD psn=HTlex1 SGML pn=char> <!--SGML character-->
A.2.1.1.2 HTlex2: SGML delimiter role names
<!NOTATION HTlex2 PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HTlex2::SGML delimiter roles//EN">
<HyPD psn=HTlex2 SGML pn=AND>
<HyPD psn=HTlex2 SGML pn=COM>
<HyPD psn=HTlex2 SGML pn=CRO>
<HyPD psn=HTlex2 SGML pn=DSC>
<HyPD psn=HTlex2 SGML pn=DSO>
<HyPD psn=HTlex2 SGML pn=DTGC>
<HyPD psn=HTlex2 SGML pn=DTGO>
<HyPD psn=HTlex2 SGML pn=ERO>
<HyPD psn=HTlex2 SGML pn=ETABO>
<HyPD psn=HTlex2 SGML pn=GRPC>
<HyPD psn=HTlex2 SGML pn=GRPO>
<HyPD psn=HTlex2 SGML pn=LIT>
<HyPD psn=HTlex2 SGML pn=LITA>
<HyPD psn=HTlex2 SGML pn=MDC>
<HyPD psn=HTlex2 SGML pn=MDO>
<HyPD psn=HTlex2 SGML pn=MINUS>
<HyPD psn=HTlex2 SGML pn=MSC>
<HyPD psn=HTlex2 SGML pn=NET>
<HyPD psn=HTlex2 SGML pn=OPT>
<HyPD psn=HTlex2 SGML pn=OR>
<HyPD psn=HTlex2 SGML pn=PERO>
<HyPD psn=HTlex2 SGML pn=PIC>
<HyPD psn=HTlex2 SGML pn=PIO>
<HyPD psn=HTlex2 SGML pn=PLUS>
<HyPD psn=HTlex2 SGML pn=REFC>
<HyPD psn=HTlex2 SGML pn=REP>
<HyPD psn=HTlex2 SGML pn=RNI>
<HyPD psn=HTlex2 SGML pn=SEQ>
<HyPD psn=HTlex2 SGML pn=SHORTREF>
<HyPD psn=HTlex2 SGML pn=STAGO>
<HyPD psn=HTlex2 SGML pn=TAGC>
<HyPD psn=HTlex2 SGML pn=VI>
A.2.1.2 SGML and HyTime semantic properties
<!NOTATION HTsem1 PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HTsem1::SGML basic constructs//EN">
The properties are checked for validity in the current parsing
context.
The following properties are declared value prescriptions of
attributes.
<HyPD psn=HTsem1 SGML pn=CDATA>character data</HyPD>
<HyPD psn=HTsem1 SGML pn=ENTITY>general entity name</HyPD>
<HyPD psn=HTsem1 SGML pn=ENTITIES>general entity names</HyPD>
<HyPD psn=HTsem1 SGML pn=ID>id value</HyPD>
<HyPD psn=HTsem1 SGML pn=IDREF>id reference value</HyPD>
<HyPD psn=HTsem1 SGML pn=IDREFS>id reference list</HyPD>
<HyPD psn=HTsem1 SGML pn=NAME>name</HyPD>
<HyPD psn=HTsem1 SGML pn=NAMES>name list</HyPD>
<HyPD psn=HTsem1 SGML pn=NMTOKEN>name token</HyPD>
<HyPD psn=HTsem1 SGML pn=NMTOKENS>name token</HyPD>
<HyPD psn=HTsem1 SGML pn=NOTATION>notation name</HyPD>
<HyPD psn=HTsem1 SGML pn=NUMBER>number</HyPD>
<HyPD psn=HTsem1 SGML pn=NUMBERS>number list</HyPD>
<HyPD psn=HTsem1 SGML pn=NUTOKEN>number token</HyPD>
<HyPD psn=HTsem1 SGML pn=NUTOKENS>number token list</HyPD>
The following properties are identifiers of objects or properties.
<HyPD psn=HTsem1 SGML pn=ENAME>entity name</HyPD>
<HyPD psn=HTsem1 SGML pn=ATTNAME>attribute name</HyPD>
<HyPD psn=HTsem1 SGML pn=GI>generic identifier</HyPD>
<HyPD psn=HTsem1 SGML pn=CID>ID of current element</HyPD>
The following properties relate to the prolog of an SGML document or
subdocument.
<HyPD psn=HTsem1 SGML pn=dtd>document type definition</HyPD>
<HyPD psn=HTsem1 SGML pn=lpd>link process definition</HyPD>
<HyPD psn=HTsem1 SGML pn=ASSGI>associated element type</HyPD>
<HyPD psn=HTsem1 SGML pn=ASSNOT>associated notation name</HyPD>
<HyPD psn=HTsem1 SGML pn=etype dspec=ENAME>entity type</HyPD>
<HyPD psn=HTsem1 SGML pn=attdefs dspec=ASSGI>attribute definition list</HyPD>
<HyPD psn=HTsem1 SGML pn=attdef dspec=ATTNAME>attribute definition</HyPD>
<HyPD psn=HTsem1 SGML pn=ATTDV dspec=ATTNAME>declared value</HyPD>
<HyPD psn=HTsem1 SGML pn=ATTDVNMT>name token in ATTDV name token group</HyPD>
The following properties relate to a parsed document instance:
<HyPD psn=HTsem1 SGML pn=ent dspec=ENAME>entity</HyPD>
<HyPD psn=HTsem1 syn pn=enot>etype[ENAME]/notation</HyPD>
<HyPD psn=HTsem1 SGML pn=datatts dspec=ENAME>data attribute specification</HyPD>
<HyPD psn=HTsem1 SGML pn=elem dspec=ID>element</HyPD>
<HyPD psn=HTsem1 SGML pn=celem>current element</HyPD>
<HyPD psn=HTsem1 SGML pn=attspecs dspec=ID>attribute specification list</HyPD>
<HyPD psn=HTsem1 SGML pn=linkatts dspec=ID>link attribute specification</HyPD>
<HyPD psn=HTsem1 SGML pn=linkres dspec=ID>result element specification</HyPD>
<HyPD psn=HTsem1 SGML pn=attval dspec=ATTNAME>attribute value</HyPD>
A.2.1.2.2 HTsem2 PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HTsem2::HyTime basic constructs//EN">
<HyPD psn=HTsem2 HyTime pn=LTN>lexical type name</HyPD>
<HyPD psn=HTsem2 HyTime pn=LMGI lex=GI>lexmodel element type</HyPD>
<HyPD psn=HTsem2 HyTime pn=PN>property name</HyPD>
<HyPD psn=HTsem2 HyTime pn=PSN>property set name</HyPD>
<HyPD psn=HTsem2 HyTime pn=spec>specifier of property</HyPD>
<HyPD psn=HTsem2 HyTime pn=FN>function name</HyPD>
<HyPD psn=HTsem2 HyTime pn=OCI>object class identifier</HyPD>
<HyPD psn=HTsem2 HyTime pn=PCOBJ>PTR to current object</HyPD>
<HyPD psn=HTsem2 HyTime pn=NLNAME>HyQ node list name</HyPD>
<HyPD psn=HTsem2 HyTime pn=REFTYPE>reference type</HyPD>
<HyPD psn=HTsem2 HyTime pn=LEXTYPE>lexical type</HyPD>
The following properties relate to location addressing:
<HyPD psn=HTsem2 HyTime pn=object dspec=PTR>object</HyPD>
<HyPD psn=HTsem2 HyTime pn=cobj>current object</HyPD>
<HyPD psn=HTsem2 HyTime pn=locsrc>location source of object</HyPD>
<HyPD psn=HTsem2 HyTime pn=cand>HyQ selector condidate</HyPD>
<HyPD psn=HTsem2 HyTime pn=DQ>dataloc data quantum</HyPD>
<HyPD psn=HTsem2 HyTime pn=pelement dspec=PTR>pseudo-element</HyPD>
<HyPD psn=HTsem2 HyTime pn=dataent>data entity</HyPD>
<HyPD psn=HTsem2 HyTime pn=dataobj dspect=PTR>data object</HyPD>
<HyPD psn=HTsem2 HyTime pn=elpelem dspec=PTR>element or pseudo-element</HyPD>
<HyPD psn=HTsem2 HyTime pn=NODETYPE>node type:(element|pelement|dataent|dataobj)
</HyPD>
<HyPD psn=HTsem2 HyTime pn=docroot>document root</HyPD>
<HyPD psn=HTsem2 HyTime pn=docpos>document position</HyPD>
<HyPD psn=HTsem2 HyTime pn=datapos>data position</HyPD>
<HyPD psn=HTsem2 HyTime pn=apropsrc>additional property source</HyPD>
The following properties relate to hyperlinking:
<HyPD psn=HTsem2 HyTime pn=hylink dspec=PTR>ilink or clink element</HyPD>
<HyPD psn=HTsem2 HyTime pn=anchors>objects linked by a hylink</HyPD>
<HyPD psn=HTsem2 HyTime pn=ANCHROLE>anchor roles of anchors of hylink</HyPD>
<HyPD psn=HTsem2 HyTime pn=linkedby>hylinks that link an anchor</HyPD>
<HyPD psn=HTsem2 HyTime pn=linkedto>other anchors of linkedby</HyPD>
<HyPD psn=HTsem2 HyTime pn=LINKEDAS>role of anchor in hylink</HyPD>
A.2.1.2.3 HTsem3: Unparsed SGML text
<!NOTATION HTsem3 PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HTsem3::Unparsed SGML text//EN">
Use of this property set requires support of the "unparsed" option in
the base module.
<HyPD psn=HTsem3 SGML pn=unpelemen dspec=ID>unparsed element (includes tags)
</HyPD>
<HyPD psn=HTsem3 SGML pn=unpcontx>unparsed content (excludes tags)</HyPD>
<HyPD psn=HTsem3 syn pn=unpcont dspec=ID>unpelem[ID]/unpcontx</HyPD>
<HyPD psn=HTsem3 SGML pn=tag dspec=GI>start-tag</HyPD>
<HyPD psn=HTsem3 SGML pn=unpatt dspec=ATTNAME>attribute value specification
</HyPD>
<HyPD psn=HTsem3 SGML pn=KEYWORD></HyPD>
A.3 HyQ: HyTime query notation
A.3.2 HyQ formal definition
-- Conventions --
-- 'UC' Reserved name
'Ulc(' Reserved operator name
!lc Useful LTN or PN or user-specified text
@lc Attribute defined elsewhere
lc Grammar non-terminal symbol
()?*+| Meta-ops: grouping opt, orep, rrep, or
'' Delimit meta-ops when used in real syntax
two hyphens Begin and end comments (as in SGML)
--
-- Delimiters --
-- Role String Description
=== ====== ===========
QESC \ Escape
QGRPO ( Group open
QGRPC ) Group close
QLIT " Literal start or end
QLITA ' Literal start or end (alternative)
--
-- HyQ --
HyQ -- The content of an element that uses the HyQ notation is a
node list that comprises the body of a query. A qdomain
and args can be specified as attributes of the query
element. --
qbody
-- Query --
query -- A query can be either a direct query or an indirect query --
(dquery|iquery)
dquery -- Direct query: the query body is specified as a
direct argument of the query --
'Query('qbody (qdomain? args)?')'
iquery -- Indirect query: the query body is specified indirectly by
reference to the fn attribute of another query element --
'UseQ('@fn (qdomain? args)?')'
qbody -- Query body --
nl
qdomain -- Query domain: node list whose objects are test for inclusion
in query result; defaults to DOMTREE if not specified. --
-- Qdomain must be specified if there are no args. --
nl
args -- Query arguments --
node*
-- Nodes --
node -- Node --
-- !literal Delimited data
@arg Argument (conforms to HyFunk ltn=arg)
CAND The candidate currently under test in a select
function. CAND has no meaning elsewhere, but
survives in nested queries until stacked when
a nested select function is invoked.
(!literal|'CAND'|@arg|oo|count)
oo -- Object of: resolves IDREF to its object --
-- Object must be valid in context in which oo occurs --
'Oo('!idref')'
count -- Returns the number of quanta in an addressable range.
The range is determined from a node list, all of whose nodes
are data objects that have a common apropsrc (that is, all of
the objects occur within the data of one other object). The
range extends from the first bit combination of the node that
is first in the common containing object, to the last bit
combination of the last node, inclusive. --
'Count('nl @quantum?')'
-- Node List --
nl --Node List --
('DOMTREE'|'DOMROOT'|assign|nlref|nlops|nldefs|oo|query)
assign -- Assign nmae to a node list to allow reuse by nl reference.
Name is constant for scope of query body and its nested
queries --
'Assign('!name nl')'
nlref -- Node list reference; resolves !name to its node list --
-- !name Name assigne to a node list definition to
allow reuse by reference; must be unique within
query element. A node list cannot be referenced
within its own body. --
'Nlref('!name')'
-- Node List Operations --
nlops -- Node list operations (like set operations) --
(select|create||union|inter|diff)
select -- Selects resulting nodes by testing specified properties
of members of a given node list. The member under test is
the "candidate" (CAND); it is included in resulting node
list if the assertion returns "TRUE". --
create -- Create node list: duplicates are not removed. --
-- Create() is the empty node list --
-- Keyword 'Create' can be omitted --
'Create'?'('(node|nl)*')'
union -- Union (sum) of node lists: duplicates are removed. --
'Union('nl+')'
diff -- Difference between node lists (non-common membership) --
-- Diff of first two nls, then (diff of result and next nl)* --
'Diff('nl+')'
-- Node List Definitions --
nldefs -- Node list definitions --
(proploc|treeloc|pathloc|listloc|dataloc|hitloc|relloc)
proploc -- Returns nl of data objects containing property of source
nodes --
-- Based on proploc element type form:
(node|nl) Locsrc
!qpn Content
@joint Attribute
@aproprsrc Attribute
@notprop Attribute --
'Proploc('(node|nl) !qpn @joint? @aproprsrc? @notprop?')'
listloc -- Pick nodes from list by position --
-- Based on listloc element type form:
nl Locsrc
mkpair* Content
@overrun Attribute
@set Attribute
'Listloc('nl mkpair* @overrun? @set?')'
treeloc -- Pick node from tree by position --
-- Based on treeloc element type form:
nl Locsrc
!snzi* Content
@overrun Attribute
@set Attribute
@treecom Attribute
'Treeloc('nl !snzi* @overrun? @set? @treecom?')'
pathloc -- Pick nodes from tree by paths --
-- Based on pathloc element type form:
nl Locsrc
mkpair* Content
@overrun Attribute
@set Attribute
treecom Attribute
'Pathloc('nl mkpair* @overrun? @set? @treecom?')'
relloc -- Locates relatives by selction from addressable ranges --
-- Based on relloc element type form:
nl Locsrc
(node|nl) Root attribute
@relation Attribute
mkpair* Content
@overrun Attribute
@set Attribute
'Relloc('nl (node|nl) @relation? mkpair* @overrun? @set?')'
dataloc -- Selects portions of each node in the node list --
-- Based on dataloc element type form:
nl Locsrc
@quantum Attribute
@catsrc Attribute
@catres Attribute
@mkpair* Content
@overrun Attribute --
'Dataloc('nl @quantum? @catsrc? @catres? mkpair* @overrun? ')'
mkpair -- Pair of axis marker, interpreted as dimspec --
(!snzi !snzi)
hitloc -- Returns node list of data objects like that addressed by a
dataloc whose content is a mrkquery whose qdomain is the
dataloc locsrc --
-- Each resulting node contains information about the location
of the match (the "hit"), in marker pairs (like mrkquery). --
match
-- Pattern Match --
match -- Pattern match: Returns a node list where each node contains
one occurrence of the matching text (a "hit"). That is,
one node is returned for each non-overlapping match
in the text in each match domain node. The number
of matches per node has to be within hitrange. --
-- Hit must be word quantum unless "bigmatch" option is
supported. --
-- !qltn Qualified lexical type name (need not be HyLex)
@lexord Attribute (overrides @lexord on model element)
Defaults to character set order if "mixcase"
option is supported, otherwise to #SGMLCASE
Lexicographic reordering takes place prior to
quantization or other normalization.
@boudnary Attribute (defaults to "ISCIEC") --
'Match('(node|nl) (hylox|!qltn|!literal)
'Oo('@lexord')'? @boundary? hitrange?')'
hylex -- Local HyLex model --
-- Based on HyLex element type:
@HyLex Content (lexical model in HyLex notation)
@norm Attribute
@lexord Attribute --
'HyLex('('@hylex')' @norm? 'Oo('@lexord')'?')'
hitrange -- Hit range: 1 <= MINHITS <= hits <= MAXHITS --
-- Omitted MAXHITS means no upper limit --
-- 1st unzi is MINHITS and 2nd is MAXHITS --
(%unzi %unzi?)
-- Assertion --
assert -- Assertion: evaluates to "TRUE" or "FALSE" --
('TRUE'|'FALSE'|ah|compare|ordered|and|or|not|forall|exists)
ah -- Assertain handler for user-defined assertion:
The IDREF addresses an object that implements the assertion.
The node list contains the operands. --
-- Requires "uassert" option of location address module. --
'Ah('!idref nl')'
forall -- Evaluates to TRUE if the query returns nodes for every node
in nl --
'Forall('nl query')'
exists -- When a node list or match occurs where an assertion is
expected,
it evaluates to TRUE if non-empty, FALSE if empty. --
(nl|match)
-- Comparison --
compare -- Comparison: tests ordering of operands. --
-- Operands in nl are data objects or literals --
-- Comparisons are done in a way appropriate for the quantum. --
-- Relations testes are TRUE if:
EQ: all operands are equal
NE: at least two operands are not equal
LT: each operand is less than its successor
LE: each operand is less or equal to its successor
GT: each operand is greater than its successor
GE: each operand is greater or equal to its successor
SS: all operands are same size (same number of quanta)
NS: at least two operands are not the same size
ST: each operand is smaller (shorter) than its successor
SE: each operand is smaller (shorter) or equal to its successor
BT: each operand is bigger (longer) than its successor
BE: each operand is bigger (longer) or equal to its successor
HO: each operand holds its successor (proper superstring)
HE: each operand holds or equals its successor (superstring)
IH: each operand is held in its successor (proper substring)
IE: each operand is held in ord equals its successor (substring)
-- Use CAND to operate on the candidate node of the active
select. --
('EQ'|'NE'|'LT'|'LE'|'GT'|'GE'|'SS'|'NS'|'ST'|'SE'|'BT'|'BE'|'HO'|'HE'|
'IH'|'IE')'('@quantum?, 'Oo('@lexord')'? (node|nl)+')'
ordered -- TRUE if all nodes are data objects that have a common
aproprsrc and are ordered within it --
-- OVERLAP TRUE if first bit combination is LE next node's
first.
NOVERLAP TRUE if each node ends before enxt begins. --
'Ordered('nl ('OVERLAP'|'NOVERLAP')?')'
-- Boolean Expressions --
and -- TRUE if all its assertions are TRUE --
'And('assert+')'
or -- TRUE if any of its assertions are TRUE --
'Or('assert+')'
not -- TRUE if its assertion is FALSE --
'Not('assert')'
A.3.3 HyQ element type
The content of a HyQ element is the body of a query in the HyQ
notation. HyQ query functions can contain arguments whose values are
passed as the "args" attribute of a HyQ element. The operands are
referenced by placeholders (%1-%999), which are replaced by a node
specified via an IDREF in the "args". A placeholder can occur
wherever anode con occur. If no arg was specified for a placeholder,
it is empty.
The usefn attribute is supported; it allows an expression to be
created once and given a query function name that can be specified in
other HyQ element that specify arguments for the expression.
An instance of a HyQ element type can have either of two architectural
forms, which differ only in the form of address in which the query
results are generated: nmquery, which generates names, and mrkquery,
which generates axis marker. When a HyQ element is used as a marker
query in a coordinate location address, the default query domain is
the location source of the coordinate location address element.
<!-- HyTime Query -->
<!NOTATION HyQ PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HyTime Query Notation//EN">
<!ELEMENT HyQ -- HyTime query --
- O (#PCDATA) >
<!ATTLIST HyQ HyTime (nmquery|mrkquery) nmquery
qdomain -- Domain of the query --
-- Multiple is combined into a single tree --
-- Constraint: No HyTime reftype constraints --
IDREFS #IMPLIED -- Default: inherent in query --
notation -- Data content notation --
NAME #FIXED HyQ
delims -- Data content notation delimiter changes --
-- Constraint: names are delmiter role names --
-- Constraint: a given NAME can occur only once --
-- lextype( (NAME, s+, char*),
(s+, NAME, s+, char*0*0 --
CDATA #IMPLIED -- Default: not changed --
fn -- Query function name --
NAME #IMPLIED
usefn -- Fn of another function to which to pass
the args of this one --
NAME #CONREF
args -- Argument string passed to the function --
-- Constraint: 1-999 IDREFS --
-- Constraint: No HyTime reftype constraints --
IDREFS #IMPLIED -- Defaults: no arguments --
qpnpsn -- QPN property set names --
-- Constraint: searched in order listed --
-- lextype(NOTATION, (s+, NOTATION)*) --
NAMES #IMPLIED -- Default: standard sets --
qltnlmgi -- QLTN lexical model GIs --
-- Constraint: searched in order listed --
-- lextype(gil) --
NAMES #IMPLIED -- Default: none used -->
A.3.4 HyQ examples
The first example locates all "equation" elements in a document.
<HyQ qdomain=mydoc>
Select(DOMTREE EQ(Proploc(CAND GI) "equation"))
<HyQ>
The next example creates a named query that can be reused with an
argument to locate all elements of a specified element type.
<HyQ fn=hasgi>
Select(DOMTREE EQ(Proploc(CAND GI) %1))
</HyQ>
The following query locates the second "para" element in the document
that occurs in a "body" element.
<HyQ qdomain=mydoc>
Listloc(
Select(
Pathloc(Select(DOMTREE EQ(Proploc(CAND GI) "body"))
1 -1 2 -1)
EQ(Proploc(CAND GI) "para") )
2 1 )
</HyQ>
The last example performs the same search as the preceding one, but it
uses the named query defined in the second example.
<HyQ qdomain=mydoc>
Listloc(
UseQ(hasgi
Pathloc(UseQ(hasgi DOMTREE "body")
1 -1 2 -1)
"para )
2 1 )
</HyQ>
A.4 Marker functions
HyOp is a simple recursive function, while HyFunk allows complex
expressions. Both use the same set of primitive operators and the
standard HyTIme dimension reference facilities. An application
designer could create higher-level forms of marker function that
resolve to the primitives used by HyOp and HyFunk.
A.4.1 HyOp: HyTime single operator marker function
<!-- HyTime Single Operator Marker Function -->
<!ELEMENT HyOp -- HyTime single operator marker function --
-- Represents (i.e., function returns) an
axis marker --
-- For use when HyFunk is not available --
-- Constraint: marklists are concatenated
into one list --
- O (marklist*) -- Content is "meta" -->
<!ATTLIST HyOp HyTime NAME #FIXED markfun
id ID #IMPLIED -- default: none --
opname -- Operator name (same as HyFunk) --
(sum|subt|mult|div|avg|max|min|abs|nabs|incr|decr|rand|mod)>
A.4.2 HyFunk: HyTime function notation
A.4.2.1 HyFunk syntax and semantics
Delimiter roles defined by the HyFunk notation.
Role String Description
==== ===== ===========
FESC \ Description
FGRPO ( Group open
FGRPC ) Group close
FRNI # Reserved name indicator
FOP @ Operator name indicator
The following table shows the syntax of the HyFunk notation, defined
using the HyLex notation.
<hylex ltn=HyFunk>(fun)</hylex>
<hylex ltn=fun>(startfun, s*, funbody?, s*, endfun)</hylex>
<hylex ltn=startfun>((operand, (s+, operand)*))</hylex>
<hylex ltn=endfun>(")")</hylex>
<hylex ltn=operand>(fun|dimref|pdimref|snzi|arg)</hylex>
<hylex ltn=dimref>("@",dimop,s*,"(",s*, refbody, s*,")")</hylex>
<hylex ltn=refbody>((IDREF|("#SCOPE")), axisnext?)</hylex>
<hylex ltn=axisnext>(s+, GI)?, (s+, NUMBER)?()</hylex>
<hylex ltn=pdimref>("@",pdimop,s*,"(",s*,prefbody, s*,")")</hylex>
<hylex ltn=prefbody>(IDREF,s+, IDREF, axisnext?))</hylex>
<hylex ltn=mfn>(NAME)</hylex>
<hylex ltn=dimop>(NAME)</hylex>
<hylex ltn=pdimop>(NAME)</hylex>
<hylex ltn=operator>(NAME)</hylex>
where:
mfn is a marker function name from a HyFunk element.
dimop is a dimension reference function, corresponding to a
combination of the selcomp and flipa ttributes of a dimref
element, named:
first for a reference to the first quantum
last for a reference to the last quantum
qcnt for a reference to the quantum count
flfirst for a reference to the first quantum with flip
fllast for a reference to the last quantum with flip
flqcnt for a reference to the quantum count with flip
Its operands are:
IDREF is the first operand, corresponding to the
elemref attribute of a dimref element.
#SCOPE is an alternative first operand, corresponding
to #SCOPE as elemref of a dimref within a
projectr or grpdex.
GI is the optional second operand, corresponding
to the extref attribute of a dimref element.
pdimop is a dimension reference function, corresponding to a
combination of the selcomp and flip attributes of a dimref
element that references the projected extent of an event or
event group, named:
pfirst for a reference to the projected first quantum
plast for a reference to the projected last quantum
pqcnt for a reference to the projected quanted count
pflfirst for a reference to the projected first quantum
with flip.
pfllast for a reference to the projected last quantum
with flip.
pflqcnt for a reference to the projected quantum count
with flip.
Its operands are:
IDREF is the first operand, corresponding to the
elemref attribute of a dimref element.
IDREF is the second operand, corresponding to the
projectr attribute of a dimref element.
GI is the option third operand, corresponding to
the axisref attribute of a dimref element.
NUMBER is the optional fourth operand, corresponding
to the extref attribute of a dimref element.
arg is a placeholder (%1-5999) that is replaced by a snum
specified directly or via an IDREF and the "ARGS" attribute
of the HyFunk element containing the function. If not
specified, it is empty.
operator is a HyFunk operator.
The following table shows each HyFunk operator name, the number of
operands in its function body, and the value it returns.
NAME FUNCTION BODY RETURNED VALUE
==== ============= ==============
avg (operand+) Average of all operands (rounded)
decr (operand) Operand decremented by 1.
div (operand, operand) First operand divided by second operand
(truncated).
incr (operand) Operand incremented by 1.
max (operand+) Highest operand
min (operand+) Lowest operand
mod (operand, operand) Remainder of first operand divided by second
operand.
mult (operand, operand+) Product of all operands multiplied together.
abs (operand) Absolute value of operand.
nabs (operand) Negated absolute value of operand.
rand () Pseudo-random value from 1 through hyqcnt
subt (operand, operand) Second operand subtracted from first.
sum (operand, operand+) Sum of all operands.
A.4.2.2 HyFunk element type
The content of a HyFunk element is an expression in the HyFunk
language. The expression can contain constant operands and/or
arguments whose values are passed as the "args" attribute of a HyFunk
element. The usefn attribute is suppored: it allows an expression to
be created once and given a function name that dan be specified in
other HyFunk element that specify arguments for the expression. See
A.4.2.3 for an example.
<!-- HyTime Function Notation -->
<!NOTATION HyFunk PUBLIC "+//ISO/IEC 10744:1992//NOTATION
HyTime Function Notation//EN">
<!ELEMENT HyFunk -- HyTime function notation expression --
- O (#PCDATA) >
<!ATTLIST HyFunk
HyTime NAME #FIXED markfun
notation -- Data content notation --
NAME #FIXED HyFunk
delims -- Data content notation delimiter changes --
-- Constraint: names are delimiter role names --
-- Constraint: a given NAME con occur only once --
-- lextype( (NAME, s+ char*),
(s+, NAME, s+, char*)* ) --
CDATA #IMPLIED -- Default: not changed --
fn -- Marker function name --
NAME #IMPLIED
usefn -- Fn of another function to which to pass the args
of this one --
NAME #CONREF
args -- Argument string passed to the function --
-- Constraint: 1-999 tokens, each being a snum
or an IDREF that ultimately located a snum --
-- lextype((snum|IDREF), (s+, (snum|IDREF))*) --
CDATA #IMPLIED -- Default: no arguments -->
A.4.2.3 HyTime Measurement Unit ratio (HMUratio)
HMUratio is a practical example of a HyFunk marker function. It is
for use in scheduled extents occurring in event projectors only. The
function element accepts a frac in its args and multiplies it by the
qcnt of the projector scope extent. An optional GI of an exis can be
included as the third arg if the extent is multidimensional.
The function expression is:
<HyFunk fn=HMUratio>@div(@mult(%1 @qcnt(#SCOPE %3))%2)</HyFunk>
Here is how it could be used in one dimension, with a ratio of 3/2:
<projectr><extent><dimspec><marklist>
<HyFunk usefn=HMUratio args="3 2">
</projectr>
A.5 Measurement
A.5.1 Useful Standard Measurement Units
<!NOTATION gquantum PUBLIC -- Generic Quantum --
"+//ISO/IEC 10744//NOTATION Virtual Measurement Unit//EN">
<!NOTATION SIsecond PUBLIC -- Time --
"+//ISO/IEC 10744//NOTATION Systeme International second//EN">
<!NOTATION SImeter PUBLIC -- Length --
"+//ISO/IEC 10744//NOTATION Systeme International meter//EN">
<!NOTATION virtime PUBLIC -- Virtual Time Unit -
"+//ISO/IEC 10744//NOTATION Virtual Measurement Unit//EN">
<!NOTATION virspace PUBLIC -- Virtual Space Unit -
"+//ISO/IEC 10744//NOTATION Virtual Measurement Unit//EN">
A.5.2 Useful measurement domain definitions
HyTime defines five measurement domain definitions for the useful SMU
notation declarations, that can be referenced as public text using the
following SGML formal public identifier:
"ISO/IEC 10744:1992//TEXT Useful Measurement Domain Definitions//EN"
(The element and attribute list declarations for "measure" and
"granule" are not included here. They are identical to the
definitions of the architectural forms, except that the content of
"granule" is declared to be empty.)
(As the set of granules is unbounded, these measurement domain
definitions are necessarily incomplete. Granules can be added easily
using the facilities described in 7.3.1.)
A.5.2.1 Generic quantum
<measure smu=gquantum>
<granule gn=quantum gd=" 1 1 GQUANTUM">
<granule gn=bit-combination gd=" 1 1 gquantum">
<granule gn=token gd=" 1 1 gquantum">
<granule gn=node gd=" 1 1 gquantum">
<granule gn=cell gd=" 1 1 gquantum">
</measure>
A.5.2.2 Virtual time
<measure smu=virtime>
<granule gn=vtu gd=" 1 1 VIRTIME">
</measure>
A.5.2.2 Virtual space
<measure smu=virspace>
<granule gn=vsu gd=" 1 1 VIRSPACE">
</measure>
A.5.2.4 Systeme International second
<measure smu=SIsecond>
<granule gn=ysec gd=" 1 1000 zsec">
<granule gn=zsec gd=" 1 1000 asec">
<granule gn=asec gd=" 1 1000 fsec">
<granule gn=fsec gd=" 1 1000 psec">
<granule gn=psec gd=" 1 1000 nsec">
<granule gn=nsec gd=" 1 1000 usec">
<granule gn=usec gd=" 1 1000 msec">
<granule gn=msec gd=" 1 10 csec">
<granule gn=csec gd=" 1 10 dsec">
<granule gn=dsec gd=" 1 10 second">
<granule gn=SMPTE-50 gd=" 1 50 second">
<granule gn=V1250 gd=" 1 50 second">
<granule gn=NTSC gd=" 1 30 second">
<granule gn=SMPTE-240M gd=" 1 30 second">
<granule gn=SMPTE-30 gd=" 1 30 second">
<granule gn=SMPTE-30-drop gd=" 100 2997 second">
<granule gn=SMPTE-25 gd=" 1 25 second">
<granule gn=PAL gd=" 1 25 second">
<granule gn=SECAM gd=" 1 25 second">
<granule gn=European gd=" 1 25 second">
<granule gn=SMPTE-24 gd=" 1 24 second">
<granule gn=motion-picture gd=" 1 24 second">
<granule gn=SMPTE-24-drop gd=" 100 2396 second">
<granule gn=PC-tick gd=" 10 182 second">
<granule gn=second gd=" 1 1 SISECOND">
<granule gn=dasec gd=" 10 1 second">
<granule gn=hsec gd=" 10 1 dasec">
<granule gn=ksec gd=" 10 1 hsec">
<granule gn=Msec gd=" 1000 1 ksec">
<granule gn=Gsec gd=" 1000 1 Msec">
<granule gn=Tsec gd=" 1000 1 Gsec">
<granule gn=Psec gd=" 1000 1 Tsec">
<granule gn=Esec gd=" 1000 1 Psec">
<granule gn=Zsec gd=" 1000 1 Esec">
<granule gn=Ysec gd=" 1000 1 Zsec">
<granule gn=minute gd=" 60 1 second">
<granule gn=quarter-hour gd=" 15 1 minute">
<granule gn=half-hour gd=" 30 1 minute">
<granule gn=hour gd=" 60 1 minute">
<granule gn=day gd=" 24 1 hour">
<granule gn=week gd=" 7 1 day">
<granule gn=fortnight gd=" 2 1 week">
<!-- Year and the granules based on it might not be accurate enough
for some applications. -->
<granule gn=year gd=" 3652422 10000 day">
<granule gn=decade gd=" 10 1 year">
<granule gn=millenium gd=" 1000 1 year">
</measure>
A.5.2.5 Systeme International meter
<measure smu=SImeter>
<granule gn=ym gd=" 1 1000 zm">
<granule gn=zm gd=" 1 1000 am">
<granule gn=am gd=" 1 1000 fm">
<granule gn=fm gd=" 1 1000 pm">
<granule gn=pm gd=" 1 1000 nm">
<granule gn=angstrom gd=" 1 10 nm">
<granule gn=nm gd=" 1 1000 um">
<granule gn=um gd=" 1 1000 mm">
<granule gn=mm gd=" 1 10 cm">
<granule gn=cm gd=" 1 10 dm">
<granule gn=dm gd=" 1 10 meter">
<granule gn=meter gd=" 1 1 SIMETER">
<granule gn=dam gd=" 10 1 meter">
<granule gn=hm gd=" 10 1 dam">
<granule gn=km gd=" 10 1 hm">
<granule gn=Mm gd=" 1000 1 km">
<granule gn=nautical-mile gd=" 1852 1 meter">
<granule gn=Gm gd=" 1000 1 Mm">
<granule gn=AU gd=" 1 206265 parsec">
<granule gn=Tm gd=" 1000 1 Gm">
<granule gn=lightyear gd=" 100 326 parsec">
<granule gn=Pm gd=" 1000 1 Tm">
<granule gn=parsec gd=" 3086 1 Tm">
<granule gn=Em gd=" 1000 1 Pm">
<granule gn=Zm gd=" 1000 1 Em">
<granule gn=Ym gd=" 1000 1 Zm">
<granule gn=microinch gd=" 1 1000 milliinch">
<granule gn=milliinch gd=" 1 1000 inch">
<!-- Point and pica are the rounded versions commonly used in computer
systems and might not be accurate enough for some applications. -->
<granule gn=point gd=" 1 12 pica">
<granule gn=pica gd=" 1 6 inch">
<granule gn=barleycorn gd=" 1 3 inch">
<granule gn=nail gd=" 1 16 yard">
<granule gn=inch gd=" 254 100 cm">
<granule gn=thumb gd=" 1 1 inch">
<granule gn=hand gd=" 4 1 inch">
<granule gn=Roman-foot gd=" 1164 1 inch">
<granule gn=foot gd=" 12 1 inch">
<granule gn=Greek-foot gd=" 1244 100 inch">
<granule gn=Northern-foot gd=" 11 10 foot">
<granule gn=cubit gd=" 18 1 inch">
<granule gn=Sumerian-cubit gd=" 495 10 cm">
<granule gn=royal-cubit gd=" 2062 100 inch">
<granule gn=yard gd=" 3 1 foot">
<granule gn=ell gd=" 5 4 yard">
<granule gn=fathom gd=" 6 1 foot">
<granule gn=perch gd=" 11 2 yard">
<granule gn=pole gd=" 1 1 perch">
<granule gn=rod gd=" 1 1 perch">
<granule gn=chain gd=" 66 1 feet">
<granule gn=furlong gd=" 220 1 yard">
<granule gn=quarter-mile gd=" 440 1 yard">
<granule gn=mile gd=" 1760 1 yard">
<granule gn=league gd=" 3 1 mile">
</measure>
A.5.3 Other standard measurement units
The following notation declarations can be used for virtual reality
applications or other situations that required units of measure other
than temporal, spatial, and generic quanta. The comprise the
remaining Systeme International base units and supplementary units.
<!NOTATION SIkg PUBLIC -- Mass --
"+//ISO/IEC 10744//NOTATION Systeme International kilogram//EN">
<!NOTATION SIkelvin PUBLIC -- Thermodynamic Temperature --
"+//ISO/IEC 10744//NOTATION Systeme International kelvin//EN">
<!NOTATION SIcd PUBLIC -- Luminous Intensity --
"+//ISO/IEC 10744//NOTATION Systeme International candela//EN">
<!NOTATION SIampere PUBLIC -- Electric Current --
"+//ISO/IEC 10744//NOTATION Systeme International ampere//EN">
<!NOTATION SImole PUBLIC -- Amount of Substance --
"+//ISO/IEC 10744//NOTATION Systeme International mole//EN">
<!NOTATION SIradian PUBLIC -- Plane Angle --
"+//ISO/IEC 10744//NOTATION Systeme International radian//EN">
<!NOTATION SIsr PUBLIC -- Solid Angle --
"+//ISO/IEC 10744//NOTATION Systeme International steradian//EN">
Declarations for other SI derived units should be constructed
similarly: the notation name should consist of the letters "SI"
followed by the special name of the derived unit if it is 6 characters
or less, otherwise by the symbol for the derived unit. (The special
name and the symbol can be found ins ISO 31-0:1991.) For example:
<!NOTATION SIC PUBLIC -- Celsius Temperature --
"+//ISO/IEC 10744//NOTATION Systeme International degree Celsius//EN">
<!-- Here ends the material extracted from Annex A of the HyTime
standard. -->